Finder Information in the Volume Catalog
Finder Information in the Volume Catalog
A catalog exists on every volume to maintain relationships between the files
and directories on that volume. (A volume is any storage medium formatted to
contain files.) Although it's used mostly by the File Manager, the catalog also
contains information used by the Finder. The information for files is listed in
data structures defined by the FInfo and FXInfo data types; the information for
directories is listed in data structures defined by the DInfo and DXInfo data
types.
Normally, your application sets the file type and the creator information in
fields of the file's FInfo record when your application creates a new file. (For
a discussion of the recommended new functions available for creating files, see
the File Manager description.) The Finder manipulates the other fields in
the FInfo record.
You typically set a file type and creator when you create the file; for example,
the FSpCreate function takes a creator and a file type as parameters. After
you have created a file, you can use the GetFInfo function to return the FInfo
record, then change the fdType and fdCreator fields by using the SetFInfo
function.
You can always check the information in this record by calling the GetFInfo
function. In particular, you may want to check the file type or creator for a
file, or you may want to check or set one of your document's Finder flags.